<template>
    <div>
      <!-- 1. click原生的click事件 $event 事件对象-->
      <h2 @click="test">选中了哪个城市 --- {{cityId}}</h2>
      <!-- <base-select :value="cityId" @input="handleChange"></base-select> -->

      <!-- 2. @input是我们自定义的事件 $event子组件传来的参数-->
      <base-select :value="cityId" @input="cityId = $event"></base-select>
      <base-select v-model="cityId"></base-select>
      <!-- :value + @input事件 -->
    </div>
</template>
<script>
import BaseSelect from './components/BaseSelect.vue'
export default {
  data(){
    return {
      cityId:'103'
    }
  },
  methods:{
    handleChange(val){
      console.log(val)
      this.cityId = val
    },
    test(a,b,c){
      console.log(a,b,c)
    }
  },
  components: {
    BaseSelect
  },
  props: {},
}
</script>

<style>
  .box{
    border:1px solid skyblue;
    width:200px;
    height:200px;
    margin:10px;
    padding:10px
  }

</style>